import { check, checkError, getRequest } from "./baseUtils"

export class ProductApi {
	
	static baseUrl = "/product"
	
	/**
	 * @param {String[]} ids
	 */
	static async getUnProduct(ids) {
		uni.showLoading({title: '检查中', mask: true})
		try {
			const response = await uni.request(getRequest({
				url: `${this.baseUrl}/unProduct`,
				method: 'GET',
				data: {ids: ids}
			}))
			
			return check(response)
		}
		catch (error) { checkError(error) }
		finally { uni.hideLoading() }
	}
}